package com.zucai365.football.service.impl;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.wcj.common.service.impl.WcjServiceImpl;
import com.zucai365.football.bean.LianSaiYearBean;
import com.zucai365.football.dao.LianSaiYearDao;
import com.zucai365.football.service.LianSaiYearService;

@Service("lianSaiYearService")
public class LianSaiYearServiceImpl extends WcjServiceImpl<LianSaiYearBean> implements LianSaiYearService{
	
	@Autowired
	@Qualifier("lianSaiYearDao")
	private LianSaiYearDao lianSaiYearDao;

	public LianSaiYearDao getLianSaiYearDao() {
		return lianSaiYearDao;
	}

	public void setLianSaiYearDao( LianSaiYearDao lianSaiYearDao ) {
		this.lianSaiYearDao = lianSaiYearDao;
	}

	@Override
	public List<LianSaiYearBean> getAllLianSaiYear() {
		DetachedCriteria criteria = DetachedCriteria.forClass( LianSaiYearBean.class, "lianSaiYear" );
		criteria.addOrder( Order.asc( "viewOrder" ) );
		return this.lianSaiYearDao.findByCriteria(criteria);
	}
	
}
